package com.atguigu.gmall.user.service.impl;

import com.atguigu.gmall.model.user.UserAddress;
import com.atguigu.gmall.user.mapper.UserAddressMapper;
import com.atguigu.gmall.user.service.UserAddressService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：MJS
 * @date ：Created in 2021/5/24  22:50
 * @description：TODO
 */
@Service
public class UserAddressServiceImpl implements UserAddressService {
    @Autowired
    private UserAddressMapper userAddressMapper;
    //收货地址
    @Override
    public List<UserAddress> getUserInfoAddress(String userId) {
        QueryWrapper<UserAddress>queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        return userAddressMapper.selectList(queryWrapper);
    }
}
